<?php 
    Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl."/js/jquery.cookie.js", CClientScript::POS_END);
    Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
    $statisticsOptions = array(
                'week' => 'Week',
                'month' => 'Month',
                'year' => 'Year'
            );
?>
<script type="text/javascript">
    $().ready(function(){
        var cookie = $('#orderRevenueTabs').tabs({ cookie: { expires: 30 , path: '/'} });
    });    
</script>
<form method="post" action="">    
    <table class="search-table">
        <tr>
            <th style="color: #000; text-align: center">From Date:</th>
            <td>                
                <?php 
                    $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                        'name'=>'fromDate',
                        'value' => (is_null($fromDate) || !$fromDate) ? date('d-m-Y', time()) : date('d-m-Y' ,$fromDate),
                        // additional javascript options for the date picker plugin
                        'options'=>array(
                            'showAnim' => 'fold',                            
                            'dateFormat' => 'dd-mm-yy'
                        ),
                        'htmlOptions'=>array(
                            'style'=>'height:20px;',
                            'class' => 'inp-form'
                        ),
                    ));
                ?>
            </td>
            <th style="color: #000; text-align: center">User:</th>
            <td><?php echo CHtml::dropDownList(
                    'user',
                    array(),
                    menuService::getUserList($user),
                    array(
                        'empty' => 'NONE',
                        'options' => array(
                            $_POST['user'] => array(
                                'selected' => true
                            )
                        )
                    )); ?></td>
            <th style="color: #000; text-align: center">Statistics by:</th>
            <td><?php echo CHtml::dropDownList(
                    'statistics_options',
                    array(),
                    $statisticsOptions, 
                    array(
                        'options' => array(
                            $_POST['statistics_options'] => array(
                                'selected' => true
                            )
                        )
                    )
                ); ?></td>
            <td><input type="submit" name="search" id="fileter" value="Filter Result" /></td>
        </tr>
    </table>
</form>